﻿using System.Collections.Generic;

namespace YanTableManger.TableData
{
    /// <summary>
    /// 最终表格式类
    /// </summary>
    class RTableData
    {
        /// <summary>
        /// 工号
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 新校区打卡补贴
        /// </summary>
        public int NewMoney { get; set; }

        /// <summary>
        /// 老校区打卡补贴
        /// </summary>
        public int OldMoney { get; set; }

        /// <summary>
        /// 全勤奖
        /// </summary>
        public int FullMoney { get; set; }

        /// <summary>
        /// 校车补贴
        /// </summary>
        public int BusMoney { get; set; }

        /// <summary>
        /// 全勤月数
        /// </summary>
        public int FullCounts { get; set; }

        /// <summary>
        /// 钱数总计
        /// </summary>
        public int AllMoney { get; set; }
        /// <summary>
        /// 将数据转化为object列表
        /// </summary>
        /// <returns></returns>
        public List<object> ToList()
        {
            return new List<object>()
            {
                Id, Name, BusMoney, NewMoney, OldMoney, FullCounts, FullMoney, AllMoney
            };
        }
        /// <summary>
        /// 自动计算总费用
        /// </summary>
        public void CalculateMoney()
        {
            AllMoney = FullMoney + BusMoney + NewMoney + OldMoney;
        }
    }
}